Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Clear for dialog fields #394

Merged
merged 10 commits into from
Oct 22, 2019
Merged

Clear for dialog fields #394

merged 10 commits into from
Oct 22, 2019

Conversation

kaczymuczy
Copy link

@kaczymuczy kaczymuczy commented Oct 21, 2019

Description

Add the option to decide whether a dialog field should be cleared or not before adding new values to it. Currently only Multifield has the clear() method implemented, others are empty. More will be added later when required during our work on testing core components.
Part of #373
Used by wttech/bobcat-aem-tests#16

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code styleguide of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@@ -49,4 +50,9 @@
default String getLabel() {
return null;
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better solution would be default here. Thanks to this it wouldn't required empty methods and would not break any API

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, document the new behaviour please :)

Copy link
Author

@kaczymuczy kaczymuczy Oct 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed & fixed

@@ -96,6 +96,7 @@ Properties:
- label - select dialog field with this label. If there is no label the fields will be selected in order.
- type - type of dialog field. All available OOB fields are displayed in section below
- value - what value should be set
- clear - true/false, currently viable only for Multifields, you decide if the field's state should be set to a blank before entering the new value. This translates to deleting all existing items in a Multifield before adding any new ones.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@mkrzyzanowski mkrzyzanowski merged commit 3b961c7 into master Oct 22, 2019
@mkrzyzanowski mkrzyzanowski deleted the clear-for-dialog-fields branch October 22, 2019 14:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants